# Contributor: TBK <alpine@jjtc.eu>
# Maintainer: TBK <alpine@jjtc.eu>
pkgname=gn
pkgver=0_git20200320
pkgrel=0
pkgdesc="GN is a meta-build system that generates build files for Ninja."
arch="all"
url="https://gn.googlesource.com/gn"
license="BSD-3-Clause"
depends="samurai"
makedepends="python3"
# archive needs to include .git for the build script to be able to determine the version
source="https://dev.alpinelinux.org/archive/gn/gn-$pkgver.tar.gz
	python3.patch
	"

build() {
	./build/gen.py
	ninja -C out
}

check() {
	./out/gn_unittests
}

package() {
	install -Dm755 out/gn "$pkgdir"/usr/bin/gn
}

sha512sums="1e289743ad431370d097e8609d74671b6d8c861d1d1b0a9b906c832bf0539460031ddc3a427f25d1dff271447b21caaf3fbc082d8ce9ef4ae20ad0a30888bffd  gn-0_git20200320.tar.gz
03435f48247c6c1eed313e9d54c5b541ccf5566354345e6a39b01a235c60430d64d8ec8878c1584ad8e62ab9b28c0c90f1c1521c5d810a4f8c7512f9bdddbd21  python3.patch"
